{template 'common/header-base'}
{php $frames = buildframes(FRAME);_calc_current_frames($frames);}
<div data-skin="default" class="skin-default {if $_GPC['main-lg']} main-lg-body {/if}">
{if $_W['template'] == 'black'}
<div class="skin-black" data-skin="black">
	<div class="head">
		<nav class="navbar navbar-default" role="navigation">
			<div class="container ">
				<div class="navbar-header">
					<a class="navbar-brand" href="{$_W['siteroot']}">
						<img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo tomedia($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="pull-left" width="110px" height="35px">
					</a>
				</div>
				<div class="collapse navbar-collapse">
					<ul class="nav navbar-nav navbar-left">
						{php global $top_nav}
						{loop $top_nav $nav}
						<li{if $nav['name'] == 'store'} class="active"{/if}><a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}>{$nav['title']}</a></li>
						{/loop}
					</ul>
					<ul class="nav navbar-nav navbar-right">
						{template 'common/header-notice'}
						<li class="dropdown">
							<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user color-gray"></i>{$_W['user']['username']} <span class="caret"></span></a>
							<ul class="dropdown-menu color-gray" role="menu">
								<li>
									<a href="{url 'user/profile'}" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
								</li>
								<li class="divider"></li>
								{if $_W['isfounder'] && !user_is_vice_founder()}
								<li><a href="http://wpa.qq.com/msgrd?v=3&uin=181020336&site=qq&menu=yes" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
								{/if}
								<li><a href="{url 'system/updatecache'}" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
								<li class="divider"></li>
								<li>
									<a href="{url 'user/logout'}"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
		</nav>
	</div>

<div class="main">
	<div class="container">
		<div class="panel panel-content main-panel-content ">
			<div class="panel-body clearfix main-panel-body ">
				<div class="left-menu">
					<div class="left-menu-content">
						<div class="left-menu-top skin-black">
							<div class="account-info-name">
								<span class="account-name"><i class="wi wi-store"></i><a href="./index.php?c=home&a=welcome&do=account&">商城</a></span>
							</div>
						</div>
						{loop $this->left_menus $key $menus}
						{if (($key == 'store_manage' || $key == 'store_payments') && !($_W['isfounder'] && !user_is_vice_founder()))}
						{php continue;}
						{/if}
						<div class="panel panel-menu">
							<div class="panel-heading">
								<span class="" data-toggle="collapse" data-target="#frame-{$key}" onclick="util.cookie.set('menu_fold_tag:{$key}', util.cookie.get('menu_fold_tag:{$key}') == 1 ? 0 : 1)">{$menus['title']}<i class="wi wi-down-sign-s pull-right"></i></span>
							</div>
							<ul class="list-group collapse {if $_GPC['menu_fold_tag:'.$key] == 0}in{/if}" id="frame-{$key}">
								{loop $menus['menu'] $menu_key $menu}
								{if $key == 'store_goods' && !empty($_W['setting']['store'][$menu_key])}
									{php continue;}
								{/if}
								<li class="list-group-item {if ($_GPC['type'] == $menu['type'] && $_GPC['do'] == 'goodsbuyer') || ($_GPC['do'] == $menu['type'] && $_GPC['do'] != 'goodsbuyer')}active{/if}">
									<a href="{$menu['url']}" class="text-over" >
										<i class="{$menu['icon']}"></i> {$menu['title']}</a>
								</li>
								{/loop}
							</ul>
						</div>
						{/loop}
					</div>
				</div>
				<div class="right-content">
{elseif $_W['template'] == 'classical'}
<style>
	.tooltip.right .tooltip-arrow{border-right-color: #428bca;}
	.tooltip.bottom .tooltip-arrow{border-bottom-color: #428bca;}
	.tooltip-inner{background-color: #428bca; padding: 6px 12px;}
</style>
<div class="skin-classical" data-skin="classical">
<div class="first-sidebar">
		<div class="{if !empty($frames['section']['platform_module_menu']['plugin_menu'])}plugin-head{/if}">
			<a class="logo-wrap" href="{$_W['siteroot']}">
				<img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo tomedia($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="logo">
			</a>
			{if !empty($_W['uid'])}
			<div class="nav">
				<ul class="main-nav">
					{php global $top_nav}
					{loop $top_nav $nav}
					<li{if $nav['name'] == 'store'} class="active"{/if}>
						<a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}>
					<i class="{$nav['icon']}"></i>
					{$nav['title']}</a>
					</li>
					{/loop}
				</ul>
				<ul class="user-info">
					<li class="dropdown">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user"></i>{$_W['user']['username']}<span class="caret"></span></a>
						<ul class="dropdown-menu color-gray dropdown-menu-right" role="menu">
							<li>
								<a href="{url 'user/profile'}" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
							</li>
							{if $_W['isfounder']}
							<li class="divider"></li>
							<li><a href="http://wpa.qq.com/msgrd?v=3&uin=181020336&site=qq&menu=yes" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
							<li><a href="{url 'system/updatecache'}" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
							<li class="divider"></li>
							{/if}
							<li>
								<a href="{url 'user/logout'}"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
			{else}
			<ul class="user-info">
				<li class="dropdown"><a href="{php echo url('user/register');}">注册</a></li>
				<li class="dropdown"><a href="{php echo url('user/login');}">登录</a></li>
			</ul>
			{/if}
		</div>
</div>
<script>
	$(function(){
		var $dropdownLi = $('.msg.dropdown');
		$dropdownLi.mouseover(function() {
			$(this).addClass('open');
		}).mouseout(function() {
			$(this).removeClass('open');
		});
	});
</script>
<div class="main main-classical">
	<div class="right-fixed-top"></div>
	<div class="container">
		<div class="panel panel-content main-panel-content {if !empty($frames['section']['platform_module_menu']['plugin_menu'])}panel-content-plugin{/if}">
		<div class="panel-body clearfix main-panel-body {if $_GPC['menu_fold_tag:classical'] == 1}folded{/if}">
			<div class="icon-unfold js-folded" onclick="util.cookie.set('menu_fold_tag:classical', util.cookie.get('menu_fold_tag:classical') == 1 ? 0 : 1)">
				<span class="wi wi-folded"></span>
			</div>
			<div class="left-menu-container">
				<div class="left-menu">
					{loop $this->left_menus $key $menus}
					{if (($key == 'store_manage' || $key == 'store_payments') && !($_W['isfounder'] && !user_is_vice_founder()))}
					{php continue;}
					{/if}
					<div class="panel panel-menu">
						<div class="panel-heading">
							<span class="no-collapse"{if $_GPC['menu_fold_tag:'.$key] == 1}collapsed{/if}" data-toggle="collapse" data-target="#frame-{$key}" onclick="util.cookie.set('menu_fold_tag:{$key}', util.cookie.get('menu_fold_tag:{$key}') == 1 ? 0 : 1)">{$menus['title']}<i class="wi wi-appsetting pull-right setting"></i></span>
						</div>
						<ul class="list-group collapse {if $_GPC['menu_fold_tag:'.$key] == 0}in{/if}" id="frame-{$key}"">
							{loop $menus['menu'] $menu_key $menu}
							{if $key == 'store_goods' && !empty($_W['setting']['store'][$menu_key])}
								{php continue;}
							{/if}
							<li class="list-group-item {if ($_GPC['type'] == $menu['type'] && $_GPC['do'] == 'goodsbuyer') || ($_GPC['do'] == $menu['type'] && $_GPC['do'] != 'goodsbuyer')}active{/if}">
								<a href="{$menu['url']}" class="text-over" >
									<span class="nav-icon" data-container="body" data-toggle="tooltip" data-placement="right" title="{$menu['title']}"><i class="{$menu['icon']}"></i></span> <span class="nav-title">{$menu['title']}</span>
								</a>
							</li>
							{/loop}
						</ul>
					</div>
					{/loop}
				</div>
			</div>
			<script>
				$(function(){
					$('.left-menu-container').slimScroll({
						width: '210px',
						height: 'calc(100vh - 51px)',
						opacity: .4,
						color: '#aaa',
					});
					$('.main-panel-content .icon-unfold').click(function(){
						$('.main-panel-content').find('.main-panel-body').toggleClass('folded');
					});
					$('.nav-icon').tooltip('hide');
				});
			</script>
			<script src="https://cdnjs.cloudflare.com/ajax/libs/jQuery-slimScroll/1.3.8/jquery.slimscroll.min.js"></script>
			<div class="right-content">
				<div class="content">
{else}
<div class="head">
<nav class="navbar navbar-default" role="navigation">
<div class="container ">
	<div class="navbar-header">
		<a class="navbar-brand" href="{$_W['siteroot']}">
			<img src="{if !empty($_W['setting']['copyright']['blogo'])}{php echo tomedia($_W['setting']['copyright']['blogo'])}{else}./resource/images/logo/logo.png{/if}" class="pull-left" width="110px" height="35px">
		</a>
	</div>
	<div class="collapse navbar-collapse">
		<ul class="nav navbar-nav navbar-left">
			{php global $top_nav}
			{loop $top_nav $nav}
			<li{if $nav['name'] == 'store'} class="active"{/if}><a href="{if empty($nav['url'])}{php echo url('home/welcome/' . $nav['name']);}{else}{$nav['url']}{/if}" {if !empty($nav['blank'])}target="_blank"{/if}>{$nav['title']}</a></li>
			{/loop}
		</ul>
		<ul class="nav navbar-nav navbar-right">
			{template 'common/header-notice'}
			<li class="dropdown">
				<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user color-gray"></i>{php echo $_W['username']} <span class="caret"></span></a>
				<ul class="dropdown-menu color-gray" role="menu">
					<li>
						<a href="{url 'user/profile'}" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
					</li>
					<li class="divider"></li>
					{if $_W['isfounder'] && !user_is_vice_founder()}
					<li><a href="http://wpa.qq.com/msgrd?v=3&uin=181020336&site=qq&menu=yes" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
					{/if}
					<li><a href="{url 'system/updatecache'}" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
					<li class="divider"></li>
					<li>
						<a href="{url 'user/logout'}"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
					</li>
				</ul>
			</li>
		</ul>
	</div>
</div>
</nav>
</div>

<div class="main">
<div class="container">
<a href="javascript:;" class="js-big-main button-to-big color-gray" title="加宽">宽屏</a>
<div class="panel panel-content main-panel-content">
	<div class="content-head panel-heading main-panel-heading">
		<span class="font-lg"><i class="wi wi-store"></i> 商城</span></div>
	<div class="panel-body clearfix main-panel-body">
		<div class="left-menu">
			<div class="left-menu-content">
				{loop $this->left_menus $key $menus}
				{if (($key == 'store_manage' || $key == 'store_payments') && !($_W['isfounder'] && !user_is_vice_founder()))}
					{php continue;}
				{/if}
				<div class="panel panel-menu">
					<div class="panel-heading">
						<span class="no-collapse">{$menus['title']}<i class="wi wi-appsetting pull-right setting"></i></span>
					</div>
					<ul class="list-group">
						{loop $menus['menu'] $menu_key $menu}
						{if $key == 'store_goods' && !empty($_W['setting']['store'][$menu_key])}
							{php continue;}
						{/if}
						<li class="list-group-item {if ($_GPC['type'] == $menu['type'] && $_GPC['do'] == 'goodsbuyer') || ($_GPC['do'] == $menu['type'] && $_GPC['do'] != 'goodsbuyer')}active{/if}">
							<a href="{$menu['url']}" class="text-over" >
								<i class="{$menu['icon']}"></i> {$menu['title']}</a>
						</li>
						{/loop}
					</ul>
				</div>
				{/loop}
			</div>
		</div>
		<div class="right-content" style="overflow: hidden;">
{/if}